#pragma once

#include "dll.h"
#include "types.h"
#include "writer.h"
#include <windows.h>
#include <string>
#include <imglib/avi.h>

namespace irender {

enum field_render {
	field_off,
	field_upper_first,
	field_lower_first
};

struct IRENDER_DLL settings 
{
	string			format;
	bool			alpha;
	field_render	field;

	img::avi::coder			encoder;
	img::avi::coder_info	encoder_info;

public:
	settings(bool read_reg = false);
	~settings();
	void read_registry();
	void write_registry();
	void configure(bool write_reg, HWND hParent = 0);
	static void read_encoder_state(img::avi::coder & e);
public:
	writer_aptr open_writer(
		size_extent const & dim, fraction frame_per_sec,
		string proposed_name = string(), 
		string const & dlg_title = string(), HWND hParent = 0);
	//don't show any dialog
	writer_aptr silent_open_writer(
		size_extent const & dim, fraction frame_per_sec, string name);
private:
	void any_format();
};

} //namespace irender
